public class PC {
    CPU cpu;
    HardDisk HD;
    void setCPU(CPU c){
        cpu = c;
    }
    void setHardDisk(HardDisk h){
        HD=h;
    }
    void show(){
        System.out.print("CPU速度："+cpu.getSpeed());
        System.out.print("硬盘容量："+HD.getAmount());
    }
}

